<?php
/**
* @version		$Id:default.php 1 2014-07-19 17:36:06Z Hoang Yen $
* @copyright	Copyright (C) 2014, Hoang Yen. All rights reserved.
* @license 		http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
?>
<h2><?php echo JText::_('COM_RESTAURANTMANAGE_DISHS_DETAIL'); ?></h2>
<div class="contentpane">
	<div>
		<span style="float: left; width: 100px;">- <?php echo JText::_('COM_RESTAURANTMANAGE_DISHS_ALIAS'); ?></span>: <?php echo $this->item->alias; ?>
	</div>
	<div>
		<span style="float: left; width: 100px; font-weight: bold;">- <?php echo JText::_('COM_RESTAURANTMANAGE_DISHS_NAME'); ?></span>: <?php echo $this->item->name; ?>
	</div>
	<div>
		<span style="float: left; width: 100px;">- <?php echo JText::_('COM_RESTAURANTMANAGE_DISHS_DESCRIPTION'); ?></span>: <?php echo $this->item->description; ?>
	</div>
	<div>
		<span style="float: left; width: 100px;">- <?php echo JText::_('COM_RESTAURANTMANAGE_DISHS_PUBLISHED'); ?></span>:
		<?php if(0==$this->item->published) {
			echo JText::_('COM_RESTAURANTMANAGE_DISHS_NONSERVE');
		} else {
			echo JText::_('COM_RESTAURANTMANAGE_DISHS_SERVE');
		}
		?>
	</div>
	<div>&nbsp;</div>	
</div>
<h2><?php echo JText::_('COM_RESTAURANTMANAGE_DISHS_ELEMENTS'); ?></h2>
<div class="contentpane">
	  <table>
		<thead><?php echo $this->loadTemplate('head');?></thead>
		<tfoot><?php //echo $this->loadTemplate('foot');?></tfoot>
		<tbody><?php echo $this->loadTemplate('body');?></tbody>
	</table>
</div>
<h2><?php echo JText::_('COM_RESTAURANTMANAGE_DISHS_TPFORM'); ?></h2>
<div class="contentpane">
	<form action="<?php echo JRoute::_('index.php')?>" enctype="multipart/form-data" method="post">
	  	<ul>
	  		<li>
	  			<span style="float: left; width: 100px;"><?php echo $this->form->getLabel('element_id'); ?></span> 
	  			: <?php echo $this->form->getInput('element_id'); ?>
	  			<?php echo $this->form->getInput('element_numbers'); ?>
	  			<?php echo $this->form->getInput('element_unit'); ?>
	  		</li>
	  		<li>
	  			<span style="float: left; width: 100px;"><?php echo $this->form->getLabel('description'); ?></span> 
	  			: <?php echo $this->form->getInput('description'); ?>
	  		</li>
	  		<li>
		        <button type="submit" style="width: 100px;">
		            <?php echo JText::_('JSAVE') ?>
		        </button>
	  		</li>
	  	</ul>
	  	<input type="hidden" name="dish_id" value="<?php echo $this->item->id ?>" />
	  	<!-- PATH -->
	  	<input type="hidden" name="option" value="com_restaurantManage" />
	    <input type="hidden" name="task" value="zdish.addElement" />
		<input type="hidden" name="view" value="zdish" />
		<?php echo JHTML::_( 'form.token' ); ?>
	</form>
</div>
